/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package downloadmanager.component;

import java.awt.Component;
import java.awt.Graphics;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;

/**
 *
 * @author Administrator
 */
public class MultiSegmentProgressBarRenderer extends MultiSegmentProgressBar implements TableCellRenderer {

    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
        this.setSegmentList((ProgressSegmentList) value);
        return this;
    }

    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        this.setSegmentList(null);
    }
}
